package com.peaker.advertisingpro.view

import android.app.Dialog
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.View
import com.peaker.advertisingpro.R
import com.peaker.advertisingpro.activity.LoginActivity
import kotlinx.android.synthetic.main.settingdialog.*

/**
 *  @ 作者 CODE_LYF
 *  @ 时间   2021/3/18.
 *  代码人生
 */
class ShowDialog(context: Context) : Dialog(context), View.OnClickListener {

    init {

    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        getWindow()?.setBackgroundDrawableResource(android.R.color.transparent)
        setContentView(R.layout.settingdialog)
        setCanceledOnTouchOutside(false)
        btn_login_manage.setOnClickListener(this)
        btn_app_set.setOnClickListener(this)
        btn_appinfo.setOnClickListener(this)
        btn_devices_info.setOnClickListener(this)

    }

    override fun onClick(v: View?) {
        when (v!!.id) {
            R.id.btn_login_manage -> {
                var intent = Intent(context, LoginActivity::class.java)
                context.startActivity(intent)
            }
            R.id.btn_app_set -> {
            }
            R.id.btn_appinfo -> {
            }
            R.id.btn_devices_info -> {
            }

        }
    }
}